/////precompiled////////
#include "precompiled.h"
////////////////////////


#include "prs_FrmDoubleStyle.h"
using namespace prs;

// TNodeFrmStringStyle ////////////////////////////////////////////////////////

// TRuleFrmStringStyleState ///////////////////////////////////////////////////

//
TRuleFrmDoubleStyleState::TRuleFrmDoubleStyleState(
  snt::text::TContext &Context,
  svl::TVariant &VParentNode,
  svl::TVariant &VState
) 
:vState(VState)
,RFont(Context,vFont)
,RFiller(Context,VParentNode,vFiller)
{
  snt::TFVoid          F;
  snt::TReturn         Return;
  snt::text::TSequence T(Context);

  vFont = (void*)NULL;
  
 *this
  | T.New("(") & A.New()
  ;
  
  A
  | F.New(this,&TRuleFrmDoubleStyleState::FFont  ) & RFont  .New() & A.New()
  | F.New(this,&TRuleFrmDoubleStyleState::FFiller) & RFiller.New() & A.New()
  | T.New(")") & Return.New()
  ;
}

// TRuleFrmStringStyle ////////////////////////////////////////////////////////

//
TRuleFrmDoubleStyle::TRuleFrmDoubleStyle(snt::text::TContext &Context,svl::TVariant &VParentNode) 
:vParentNode(VParentNode)
,RState(Context,VParentNode,vState)
{
  snt::TReturn         Return;
  snt::TFVoid          F;
  snt::text::TSequence T(Context);
  snt::text::TKeyword K(Context);
  prs::TFuncNewNodeIntoAttrOldChildren FNewNode;

  vState = (void*)NULL;

  this->Name(GetClassName()).Local(vParentNode)
  | K.New("double") & FNewNode.New(VParentNode,TNodeFrmDoubleStyle()) & T.New("(") & A.New()
  ;
  
  A.Name(GetClassName() + "[A]")
  | T.New("normal")  & F.New(this,&TRuleFrmDoubleStyle::FNormal ) & RState.New() & A.New()
  | T.New("focused") & F.New(this,&TRuleFrmDoubleStyle::FFocused) & RState.New() & A.New()
  | T.New(")") & Return.New()
  ;

  //svl::TMessageModal(GetClassName() << "\r\n" << GetGraphInfo(""));
}
